package com.bestbuy.pojo;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

/**
 * @author ThanhNgo
 *
 */
@Entity
@Table(name = "account_role")
public class AccountRole implements Serializable {
	
	@Id
    @Column(name="IDACCOUNT_ROLE")
    @GeneratedValue
	private Integer idAccountRole;

	@Column(name="IDROLE")
	private Integer idRole;
	
	@Column(name="ROLE")
	private String role;
	
	@Column(name="IDACCOUNT")
	private Integer idAccount;
	
	@OneToOne  
	@PrimaryKeyJoinColumn
	private Account account;

	public Integer getIdAccountRole() {
		return idAccountRole;
	}

	public void setIdAccountRole(Integer idAccountRole) {
		this.idAccountRole = idAccountRole;
	}

	public Integer getIdRole() {
		return idRole;
	}

	public void setIdRole(Integer idRole) {
		this.idRole = idRole;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public Integer getIdAccount() {
		return idAccount;
	}

	public void setIdAccount(Integer idAccount) {
		this.idAccount = idAccount;
	}

	public Account getAccount() {
		return account;
	}

	public void setAccount(Account account) {
		this.account = account;
	}

	public AccountRole(Integer idAccountRole, Integer idRole, String role,
			Integer idAccount, Account account) {
		super();
		this.idAccountRole = idAccountRole;
		this.idRole = idRole;
		this.role = role;
		this.idAccount = idAccount;
		this.account = account;
	}

	public AccountRole() {
	}
	
	
}
